package com.scaffold.commons.web;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class ExceptionFilter implements Filter {
	private static final Logger log = LoggerFactory.getLogger(ExceptionFilter.class);
	
	public void destroy() {
		log.debug("destroy.");
	}

	public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {

		//请求路径
		try{

		} finally {
		}
	}

	public void init(FilterConfig filterConfig) throws ServletException {
		
	}
}

/*
 web.xml配置说明
	<!-- security filter  -->
	<filter>
		<filter-name>SecurityFilter</filter-name>
		<filter-class>com.online.security.http.ServletFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>utf-8</param-value>
		</init-param>
		<init-param>
			<param-name>url_nopopedom</param-name>
			<param-value>/common/nopopedom.jsp</param-value>
		</init-param>
		<init-param>
			<param-name>url_login</param-name>
			<param-value>/user/guest/login.jsp</param-value>
		</init-param>
		<init-param>
			<param-name>config</param-name>
			<param-value>/security.xml</param-value>
		</init-param>
	</filter>
	
	<filter-mapping>
		<filter-name>SecurityFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
 */
